Range

Function

This API is used to get the parameter range of the System > N+M Hot Standby Page page.

Note:

Range Provides reference information on client UI limits and API request limits. When sending Get and Set request, the parameters must be limited strictly according to the Range, or request may be machine rejected.

Request Message

None.

Sample:

POST API/SystemConfig/HotStandby/Range HTTP/1.1
{
    "data": {}
}

Response Message

Parameter Description

Table 1

ParameterRangeTypeDescription
mode"worker", "standby"string
operation_type"ModifyMode", "AddDevice", "DelDevice"stringOperation type.
standbyobjectFor detailed information, please refer to Table 2.
workerobjectFor detailed information, please refer to Table 3.

Table 2

ParameterRangeTypeDescription
disable_add_btnboolWhether to disable the add button.
disable_del_btnboolWhether to disable the delete button.
worker_list0 ~ 32object arrayFor detailed information, please refer to Table 4.
standby_list0 ~ 5object arrayFor detailed information, please refer to Table 5.

Table 3

ParameterRangeTypeDescription
enablebooltrue: Working mode, false: Disable this function.
standby_ip0 ~ 64stringThe IP address of the hot standby device connected to this device.
connect_status"None",
"connected",
"disconnected"
stringConnect status.

Table 4

ParameterRangeTypeDescription
ip0 ~ 64string
port1 ~ 65535int
username0 ~ 35string
password0 ~ 35string
connnect_status"None",
"Success",
"Failed",
"AuthFailed",
"Logout"
stringConnect status.
working_status"None",
"StartRecord",
"Recording",
"StartRestore",
"Restoring"
stringWorking status.
standby_ip0 ~ 64stringStandby IP.
base_enc_passwordobjectEncrypted Password, see base_enc_password for more information.

Table 5

ParameterRangeTypeDescription
ip0 ~ 64string
port1 ~ 65535int
username0 ~ 35string
password0 ~ 35string
connnect_status"None",
"Success",
"Failed",
"AuthFailed",
"Logout"
stringConnect status.
base_enc_passwordobjectEncrypted Password, see base_enc_password for more information.

Tips:

The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "mode": {
            "type": "string",
            "items": [
                "worker",
                "standby"
            ]
        },
        "operation_type": {
            "type": "string",
            "items": [
                "ModifyMode",
                "AddDevice",
                "DelDevice"
            ]
        },
        "standby": {
            "type": "object",
            "items": {
                "disable_add_btn": {"type": "bool"},
                "disable_del_btn": {"type": "bool"},
                "worker_list": {
                    "type": "array",
                    "min_size": 0,
                    "max_size": 32,
                    "items": [{
                        "ip": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 64
                        },
                        "port": {
                            "type": "int32",
                            "min": 1,
                            "max": 65535
                        },
                        "username": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 35
                        },
                        "password": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 35
                        },
                        "connect_status": {
                            "type": "string",
                            "items": [
                                "None",
                                "Success",
                                "Failed",
                                "AuthFailed",
                                "Logout"
                            ]
                        },
                        "working_status": {
                            "type": "string",
                            "items": [
                                "None",
                                "StartRecord",
                                "Recording",
                                "StartRestore",
                                "Restoring"
                            ]
                        },
                        "standby_ip": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 64
                        },
                        "base_enc_password": {
                            "type": "object",
                            "items": {
                                "seq": {
                                    "type": "int32",
                                    "min": 0,
                                    "max": 1000000
                                },
                                "peer_key": {
                                    "type": "string",
                                    "min_len": 0,
                                    "max_len": 1024
                                },
                                "cipher": {
                                    "type": "string",
                                    "min_len": 0,
                                    "max_len": 1024
                                }
                            }
                        }
                    }]
                },
                "standby_list": {
                    "type": "array",
                    "min_size": 0,
                    "max_size": 5,
                    "items": [{
                        "ip": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 64
                        },
                        "port": {
                            "type": "int32",
                            "min": 1,
                            "max": 65535
                        },
                        "username": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 35
                        },
                        "password": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 35
                        },
                        "connect_status": {
                            "type": "string",
                            "items": [
                                "None",
                                "Success",
                                "Failed",
                                "AuthFailed",
                                "Logout"
                            ]
                        },
                        "base_enc_password": {
                            "type": "object",
                            "items": {
                                "seq": {
                                    "type": "int32",
                                    "min": 0,
                                    "max": 1000000
                                },
                                "peer_key": {
                                    "type": "string",
                                    "min_len": 0,
                                    "max_len": 1024
                                },
                                "cipher": {
                                    "type": "string",
                                    "min_len": 0,
                                    "max_len": 1024
                                }
                            }
                        }
                    }]
                }
            }
        },
        "worker": {
            "type": "object",
            "items": {
                "enable": {"type": "bool"},
                "standby_ip": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 64
                },
                "connect_status": {
                    "type": "string",
                    "items": [
                        "None",
                        "connected",
                        "disconnected"
                    ]
                }
            }
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.